#ifndef _BIND_ID_H
#define _BIND_ID_H

#include <list>
using namespace std;

#define BIND_ID_NAMESPACE			BindID
#define BIND_ID_NAMESPACE_BEGIN		namespace BIND_ID_NAMESPACE {
#define BIND_ID_NAMESPACE_END		}
#define USING_BIND_ID				using namespace BIND_ID_NAMESPACE;

#ifdef BINDID_EXPORTS
#define BIND_ID_EXPORT __declspec(dllexport)
#else
#define BIND_ID_EXPORT
#endif

BIND_ID_NAMESPACE_BEGIN

struct tBindID {
	BIND_ID_EXPORT tBindID();
	long long primaryKey;
	long long secondaryKey;
};

struct tBindInfo {
	tBindID bindKey;
	string textInfo;
};
typedef list<tBindInfo> tBindInfoList;

class IBindingObject
{
public:
	virtual string GetPrimaryKey() const = 0;
	virtual string GetSecondaryKey() const = 0;
	virtual string GetTextInfo() const = 0;
}; 

class IBindIDManager {
public:
	virtual void Initialize(const string& orgID, const string& platformID) = 0;

	virtual tBindInfo ConvertToBindInfo(const string& orgID, 
										const string& platformID,
										const string& primaryKey,
										const string& secondaryKey) = 0;

	virtual tBindInfo ConvertToBindInfo(const string& primaryKey, const string& secondaryKey) = 0;

	virtual tBindInfo ConvertToBindInfo(const IBindingObject* bindingObject) = 0;

	static BIND_ID_EXPORT IBindIDManager* GetBindIDManager();
};

BIND_ID_NAMESPACE_END

#endif //_BIND_ID_H